package edu.sctu.zhoumengxue.day201505.day20150522.student;

import java.util.ArrayList;

/**
 * Created by user12 on 2015/5/22.
 */
public class ListAdd {
    public static void ListAdd(){
        ArrayList list1= new ArrayList();
        list1.add("java");
        list1.add("php");//List集合中的元素可以重复
        list1.add(".net");
        System.out.println("原集合："+list1);
        list1.add(1,"Flash");
        list1.add(0, "ps");
        System.out.println(list1);

        ArrayList list2 = new ArrayList();
        list2.add("javascript");
        list2.add("3dMax");
        list2.add("IBM");

        list1.addAll(0,list2);
        System.out.println(list1);

    }
}
